package com.bjut.vendormgrsys.web.dto.user;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import java.util.List;

/**
 * UserInfo
 */
@Data
@Validated
public class UserInfo {
    @Schema(description = "用户id(修改上送，创建不需要)")
    @JsonProperty("id")
    private String id = null;

    @Schema(description = "账号")
    @JsonProperty("account")
    private String account = null;

    @Schema(description = "姓名")
    @JsonProperty("name")
    private String name = null;

    @Schema(description = "邮箱")
    @JsonProperty("email")
    private String email = null;

    @Schema(description = "密码")
    @JsonProperty("passwd")
    private String passwd = null;

    @JsonProperty("originPwd")
    private String originPwd=null;

    @Schema(description = "电话")
    @JsonProperty("phone")
    private String phone = null;

    @Schema(description = "状态:ENABLE-可用  DISABLE-不可用  INIT-新建")
    @JsonProperty("status")
    private String status = null;

    @JsonProperty("auditsStatus")
    private String auditsStatus;

    @Schema(description = "公司名称")
    @JsonProperty("company")
    private String company = null;

    @JsonProperty("birth")
    private String birth = null;

    @JsonProperty("memberRole")
    private String memberRole = null;

    @JsonProperty("city")
    private String city = null;

    @JsonProperty("gender")
    private String gender = null;

    @JsonProperty("job")
    private String job = null;

    @JsonProperty("major")
    private String major = null;

    @JsonProperty("school")
    private String school = null;

    @JsonProperty("subject")
    private String subject = null;

    @JsonProperty("proTitle")
    private String proTitle = null;

    @JsonProperty("score")
    private Integer score=0;

    @JsonProperty("childList")
    private List<UserChildInfo> userChildInfoList = null;

    @Schema(description = "创建人id")
    @JsonProperty("creator")
    private String creator = null;

    @Schema(description = "创建时间(前端不进行上送)")
    @JsonProperty("dateCreated")
    private Long dateCreated = null;

    @Schema(description = "最后更新时间(前端不进行上送)")
    @JsonProperty("lastUpdated")
    private Long lastUpdated = null;

    @Schema(description = "角色")
    @JsonProperty("role")
    @Valid
    private String role = null;

    public UserInfo() {
    }

    public UserInfo id(String id) {
        this.id = id;
        return this;
    }

    public UserInfo account(String account) {
        this.account = account;
        return this;
    }

    public UserInfo name(String name) {
        this.name = name;
        return this;
    }

    public UserInfo email(String email) {
        this.email = email;
        return this;
    }

    public UserInfo passwd(String passwd) {
        this.passwd = passwd;
        return this;
    }

    public UserInfo phone(String phone) {
        this.phone = phone;
        return this;
    }

    public UserInfo status(String status) {
        this.status = status;
        return this;
    }

    public UserInfo company(String company) {
        this.company = company;
        return this;
    }

    public UserInfo creator(String creator) {
        this.creator = creator;
        return this;
    }

    public UserInfo dateCreated(Long dateCreated) {
        this.dateCreated = dateCreated;
        return this;
    }

    public UserInfo lastUpdated(Long lastUpdated) {
        this.lastUpdated = lastUpdated;
        return this;
    }

    public UserInfo role(String role) {
        this.role = role;
        return this;
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserInfo;
    }

}
